import edu.cqie.dao.UserDaoImpl;
import edu.cqie.dao.UserDaoMysqlImpl;
import edu.cqie.dao.UserDaoOracleImpl;
import edu.cqie.service.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {
    public static void main(String[] args) {
//        UserServiceImpl userService = new UserServiceImpl();
//        userService.setUserDao(new UserDaoMysqlImpl());
//        userService.getUser();
        ApplicationContext context =new ClassPathXmlApplicationContext("ApplicationContext.xml");
        UserServiceImpl userServiceImpl = (UserServiceImpl) context.getBean("UserServiceImpl");
        userServiceImpl.getUser();
    }
}
